<?php if (!defined('TL_ROOT')) die('You can not access this file directly!');

/**
* TYPOlight Open Source CMS
* Copyright (C) 2005-2010 Leo Feyer
*
* This program is free software: you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation, either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program. If not, please visit the Free
* Software Foundation website at <http://www.gnu.org/licenses/>.
*
* PHP version 5
* @copyright  PLUSX.de 2010
* @author     PLUSX.de
* @package    SocialBookmarks
* @license    LGPL
* @filesource
*/



/**
* Table tl_social_bookmarks
*/
$GLOBALS['TL_DCA']['tl_social_bookmarks'] = array
(

// Config
	'config' => array
(
		'dataContainer'               => 'Table',
		'enableVersioning'            => true
),

// List
	'list' => array
(
		'sorting' => array
(
			'mode'                    => 1,
			'fields'                  => array('name'),
			'flag'                    => 1,
			'panelLayout'             => 'search,limit'
			),
		'label' => array
			(
			'fields'                  => array('icon','name','name'),
			'format'                  => '<img src="%s" alt="%s" /> %s'
			),
		'global_operations' => array
			(
			'all' => array
			(
				'label'               => &$GLOBALS['TL_LANG']['MSC']['all'],
				'href'                => 'act=select',
				'class'               => 'header_edit_all',
				'attributes'          => 'onclick="Backend.getScrollOffset();"'
				)
				),
		'operations' => array
				(
			'edit' => array
				(
				'label'               => &$GLOBALS['TL_LANG']['tl_social_bookmarks']['edit'],
				'href'                => 'act=edit',
				'icon'                => 'edit.gif'
				),
			'copy' => array
				(
				'label'               => &$GLOBALS['TL_LANG']['tl_social_bookmarks']['copy'],
				'href'                => 'act=copy',
				'icon'                => 'copy.gif'
				),
			'delete' => array
				(
				'label'               => &$GLOBALS['TL_LANG']['tl_social_bookmarks']['delete'],
				'href'                => 'act=delete',
				'icon'                => 'delete.gif',
				'attributes'          => 'onclick="if (!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm'] . '\')) return false; Backend.getScrollOffset();"'
				),
			'show' => array
				(
				'label'               => &$GLOBALS['TL_LANG']['tl_social_bookmarks']['show'],
				'href'                => 'act=show',
				'icon'                => 'show.gif'
				)
				)
				),

				// Palettes
	'palettes' => array
				(
				#'__selector__'                => array(''),
		'default'                     => 'name,icon,url,text,published;{expert_legend:hide},style,cssID'
		),

		// Subpalettes
	'subpalettes' => array
		(
		''                            => ''
		),

		// Fields
	'fields' => array
		(
		'name' => array
		(
			'label'                   => &$GLOBALS['TL_LANG']['tl_social_bookmarks']['name'],
			'exclude'                 => true,
			'inputType'               => 'text',
			'eval'                    => array('mandatory'=>true, 'maxlength'=>255)
		),
		'icon' => array
		(
			'label'                   => &$GLOBALS['TL_LANG']['tl_social_bookmarks']['icon'],
			'inputType'               => 'fileTree',
			'eval'                    => array('files'=>true, 'fieldType'=>'radio')
		),
		'url' => array
		(
			'label'                   => &$GLOBALS['TL_LANG']['tl_social_bookmarks']['url'],
			'exclude'                 => true,
			'inputType'               => 'text',
			'eval'                    => array('mandatory'=>true, 'maxlength'=>255)
		),
		'text' => array
		(
			'label'                   => &$GLOBALS['TL_LANG']['tl_social_bookmarks']['text'],
			'inputType'               => 'text'
			),
		'style' => array
			(
			'label'                   => &$GLOBALS['TL_LANG']['tl_social_bookmarks']['style'],
			'inputType'               => 'text',
			'exclude'                 => true,
			'eval'                    => array('maxlength'=>255, 'tl_class'=>'long'),
			),
		'cssID' => array
			(
			'label'                   => &$GLOBALS['TL_LANG']['tl_social_bookmarks']['cssID'],
			'inputType'               => 'text',
			'exclude'                 => true,
			'eval'                    => array('multiple'=>true, 'size'=>2, 'maxlength'=>240, 'tl_class'=>'w50'),
			),
		'published' => array
			(
			'label'                   => &$GLOBALS['TL_LANG']['tl_social_bookmarks']['published'],
			'inputType'               => 'checkbox',
			'filter'                  => true,
			'flag'                    => 2,
			'exclude'                 => true,
			),
			)
			);
			?>